package com.saicyc.demo.controller;

import com.saicyc.demo.application.CodeAppilication;
import com.saicyc.demo.bean.CreateCodeBean;
import com.saicyc.demo.vo.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags="代码生成")
@CrossOrigin
@RestController
@RequestMapping("code")
public class CodeController {

    @Resource
    private CodeAppilication codeAppilication;

    @ApiOperation(value = "创建代码", notes = "创建代码")
    @PostMapping("/createCode")
    public ResultVo<Boolean> createCode( @RequestBody @Validated CreateCodeBean createCodeBean){

        codeAppilication.createCode(createCodeBean);
        return null;
    }
}
